﻿@using BrnMall.Web.StoreAdmin.Models
@model BrnMall.Web.StoreAdmin.Models.DirectPaymentListModel

@section header{
    <title>订单列表-订单管理</title>
    <link type="text/css" rel="stylesheet" href="/admin_store/css/site.css" />
    <script type="text/javascript" src="/admin_store/scripts/jquery.js"></script>
    <script type="text/javascript" src="/admin_store/scripts/showlist.js"></script>
}

@section body{
    <h1 class="rightH1">
        微信小程序 &gt; 订单管理 &gt; <span class="rightH1-cur">订单列表</span> 
        <div class="right">
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>
    @using (Html.BeginForm("DirectPayOrderList", "order"))
    {

        <div class="dataListSearch">
            <table height="32">
                <tbody class="col4">
                    <tr>
                        <td class="td1">订单编号：@Html.TextBox("PSN", Model.PSN, new { height = "18" })</td>
                        <td class="td2">账号名称：@Html.TextBox("AccountName", Model.AccountName, new { height = "18" })</td>
                        <td><input id="SearchOrder" name="SearchOrder" type="image" class="searchBut submit" src="/admin_store/images/s.jpg" /></td>
                    </tr>
                </tbody>
            </table>
        </div>

        <div class="dataList">
            <table width="100%">
                <thead>
                    <tr>
                        <th width="10" align="center"></th>
                        <th width="80" align="left">用户</th>
                        <th width="180" align="left">订单编号</th>
                        <th width="140" align="left">下单时间</th>
                        
                        <th width="80" align="left">订单金额</th>
                        <th width="80" align="left">支付积分</th>
                        <th width="80" align="left">余额抵扣</th>
                        <th width="80" align="left">优惠券抵扣</th>
                        <th width="80" align="left">应付金额</th>
                        <th width="80" align="left">订单状态</th>

                    </tr>
                </thead>
                <tbody>
                    @foreach (DirectPaymentModel dir in Model.OrderList)
                    {
                        <tr>
                            <td align="center"></td>
                            <td><img src="@dir.User.Avatar" style="border-radius: 5px;" width="50" height="50" alt="" /></td>
                            <td>@dir.PSN</td>
                            <td><div>@dir.User.UserName</div><div>@dir.AddTime</div></td>
                            
                            <td>@dir.OrderAmount </td>
                            <td>积分：@dir.PayCreditCount 抵扣: @dir.PayCreditMoney </td>
                            <td>@dir.PayCash</td>
                            <td>@dir.CouponMoney</td>
                            <td>@dir.SurplusMoney</td>
                            <td>
                                @if (dir.OrderState == 0)
                                {
                                    @:待支付
                                }else if (dir.OrderState == 1)
                                {
                                    @:已支付
                                }else if (dir.OrderState == 2)
                                {
                                    @:已取消
                                }
                                
                            </td>
                            
                        </tr>
                    }
                </tbody>
            </table>
        </div>
        <div class="dataListEdit">
            <div class="page">
                @Html.StoreAdminPager(Model.PageModel)
            </div>
        </div>
    }
}